package cn.smbms.biz.impl;

import java.util.List;

import cn.smbms.dao.IFunctionAuthorityDao;
import cn.smbms.bean.model.FunctionAuthority;
import cn.smbms.biz.IFunctionAuthorityBiz;

public class FunctionAuthorityBizImpl implements IFunctionAuthorityBiz{
	private IFunctionAuthorityDao dao;
	public IFunctionAuthorityDao getDao() {
		return dao;
	}
	public void setDao(IFunctionAuthorityDao dao) {
		this.dao = dao;
	}

	//根据用户名模糊查询用户信息
	@Override
	public List<FunctionAuthority> getFunctionAuthorityByName(String name) {
		return dao.getFunctionAuthorityByName(name);
	}

	//添加用户
	@Override
	public int add(FunctionAuthority functionAuthority) {
		return dao.add(functionAuthority);
	}

	//根据用户帐号查询用户信息
	@Override
	public FunctionAuthority findFunctionAuthorityByName(String name) {
		return dao.findFunctionAuthorityByName(name);
	}

	//更新用户信息
	@Override
	public int update(FunctionAuthority functionAuthority) {
		return dao.update(functionAuthority);
	}

	//删除用户信息
	@Override
	public int delete(String name) {
		return dao.delete(name);
	}
}
